
if exists(select name from sysobjects where name = 'sp_SinhVienUpdateLyLich')
	drop proc sp_SinhVienUpdateLyLich
go
/*
	Created by: Phuoc NH
	Created on: 13/0/2013 (dd/mm/yyyy)
	Description: 
	--

	File:$sql-scripts/Proc.sp_SinhVienUpdateLyLich.sql
*/

create proc sp_SinhVienUpdateLyLich
@MaSinhVien varchar(50),
@Ten Nvarchar(50),
@Ho Nvarchar(20),
@NgaySinh varchar(10),
@GioiTinh tinyint,
@CMTND varchar(15),
@HoKhau Nvarchar(1000),
@NoiSinh Nvarchar(1000),
@NamTotNghiep varchar(50),
@SoHieuBang12 varchar(10),
@DanToc int,
@TonGiao Nvarchar(50),
@NgayCap varchar(10),
@NoiCap nvarchar(500),
@HoTenBo Nvarchar(100),
@hoTenMe Nvarchar(100),
@NNBo NVarchar(100),
@NNMe Nvarchar(100)
as
begin
	set dateformat dmy
	update SinhVien set Ten=@Ten, Ho=@Ho, NgaySinh=@NgaySinh, GioiTinh=@GioiTinh, 
			CMTND=@CMTND, HoKhau=@HoKhau, NoiSinh=@NoiSinh, NamTN12=@NamTotNghiep, SoHieuBang12=@SoHieuBang12,
			DanToc=@DanToc, TonGiao=@TonGiao, NgayCap=@NgayCap, NoiCap=@NoiCap, HoTenBo=@HoTenBo, HoTenMe=@hoTenMe, NNBo=@NNBo, NNMe=@NNMe where MaSinhVien=@MaSinhVien			
end


